Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OpenAI compatible providers through a base URL #6

Closed

Conversation

ldmosquera
Copy link

@ldmosquera ldmosquera commented Mar 11, 2025

Allow configuring an arbitrary HTTP endpoint for an OpenAI compatible API, which easily affords compatibility with any inference engines that provide it.

A few popular ones are name dropped in the docs for searchability; I suggest you also mention OAI compatibility in the readme, which will interest people looking for fully self-hosted solutions.

@sergio-fry
Copy link

+1

@ldmosquera
Copy link
Author

Note that I only saw issue #2 (for adding proper Ollama support) after I created this PR; two things:

  • obviously this one is for OpenAI compatible APIs instead, not the Ollama API proper
  • this one does the bare minimum to allow pointing to a custom endpoint, with equally minimum functionality

IMHO this one still has value as an OAI compatible MVP, as it's minimally intrusive but it already affords access to basic self-hosted inference. Many other LLM clients also support this type of integration, sometimes in addition to Ollama.

@crmne
Copy link
Owner

crmne commented Mar 12, 2025

Hey @ldmosquera! Thanks for the PR, but I'd rather we skip the half-measure and build a proper Ollama provider that speaks directly to their native API instead. The compatibility layer is just going to cause headaches - when I built the Gemini provider, I started with their OpenAI compatibility layer and ran into a ton of issues. Plus, Ollama's layer doesn't even support tool_choice. If you're up for it, I'd love to see a PR for that instead.

@ldmosquera
Copy link
Author

Fair enough; I can start a draft PR for that one.

@ldmosquera ldmosquera closed this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants